//
//  Relationship.m
//  cliqset
//
//  Created by David Hinson on 3/16/09.
//  Copyright 2009 Cliqset, Inc.. All rights reserved.
//

#import "Relationship.h"

// Target
@implementation Target

@synthesize userIdentifier = _userIdentifier;
@synthesize givenName      = _givenName;
@synthesize familyName     = _familyName;
@synthesize gender         = _gender;
@synthesize avatarURL      = _avatarURL;
@synthesize avatarBlob     = _avatarBlob;
@synthesize hometown       = _hometown;

-(id)init {
	self = [super init];
	return self;
}

-(void)dealloc {
	[_userIdentifier release];
	[_givenName release];
	[_familyName release];
	[_gender release];
	[_avatarURL release];
	[_avatarBlob release];
	[_hometown release];
	[super dealloc];
}

@end

@implementation TargetStatus

@synthesize updated = _updated;
@synthesize status  = _status;

-(id)init {
	self = [super init];
	return self;
}

-(void)dealloc {
	[_updated release];
	[_status release];
	[super dealloc];
}

@end


@implementation Relationship

@synthesize subjectIdentifier = _subjectIdentifier;
@synthesize targetIdentifier  = _targetIdentifier;
@synthesize target            = _target;
@synthesize tags              = _tags;
@synthesize mutual            = _mutual;
@synthesize targetStatus      = _targetStatus;

-(id)init {
	self = [super init];
	
	self.tags = [[NSMutableArray alloc] init];
	
	return self;
}

-(void)dealloc {
	
	[self.tags removeAllObjects];
	
	[_subjectIdentifier release];
	[_targetIdentifier release];
	[_target release];
	[_tags release];
	[_mutual release];
	[_targetStatus release];
	
	[super dealloc];
}

@end
